package org.dromara.web.domain.bo;

import org.dromara.web.domain.TUser;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;

/**
 * 用户业务对象 t_user
 *
 * @author Lion Li
 * @date 2024-10-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = TUser.class, reverseConvertGenerate = false)
public class TUserBo extends BaseEntity {

    /**
     * 主键ID
     */
    @NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
    private Integer id;

    /**
     * 微信OpenID
     */
    private String openId;

    /**
     * 用户状态
     */
    @NotNull(message = "用户状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long status;

    /**
     * 用户名
     */
    @NotBlank(message = "用户名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String username;

    /**
     * 用户证件号
     */
    @NotBlank(message = "用户证件号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String uid;

    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String password;

    /**
     * 头像
     */
    @NotBlank(message = "头像不能为空", groups = { AddGroup.class, EditGroup.class })
    private String avatar;

    /**
     * 手机号
     */
    @NotBlank(message = "手机号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String phone;


}
